package ru.ssau.berlin.framework;

import javax.naming.InitialContext;
import javax.naming.NamingException;


public class JNDIHelper {

    private static final String project = "Berlinum";

    public static String getBeanName(Class cl) {
        return getBeanName(cl, InterfaceType.LOCAL);
    }

    public static String getBeanName(String name) {
        return getBeanName(name, InterfaceType.LOCAL);
    }

    public static String getBeanName(Class cl, InterfaceType type) {
        return getBeanName(cl.getSimpleName(), type);
    }

    public static String getBeanName(String name, InterfaceType type) {
        return project + "/" + name + "/" + type.toString();
    }

}
